package com.alibaba.citrus.cr.sales.plan.model.enums;

import java.util.Arrays;

/**
 * @author zls
 * @description:
 * @date 2021年10月30日
 */
public enum SalesPlanAdjustCheckStatusEnum {

    /**
     * 草稿
     * 默认状态
     */
    INIT_DRAFT(0, "草稿"),

    /**
     * 生成客户调整回复量
     */
    DECOMPOSE_ADJUST_RETURN(1, "生成客户调整回复量");

    private int code;
    private String desc;

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    SalesPlanAdjustCheckStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static SalesPlanAdjustCheckStatusEnum of(int code) {
        return Arrays.stream(SalesPlanAdjustCheckStatusEnum.values()).filter(source -> code == source.code).findFirst().orElse(null);
    }
}
